package one.stand.mapper;

import one.stand.model.GoodsType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodstypeMapperExt extends GoodsTypeMapper {

    int delGoodsType(Integer goodstypeId);

    void updateGroupName(@Param("parentId") Integer parentId, @Param("name") String name);

    int updateDelByIds(@Param("ids") String ids);

    Integer getGoodsTypeSortMax(Integer companyId);

    GoodsType getThanGoodsTypeId(@Param("goodstypeId") Integer id, @Param("type") Integer type);

    List<GoodsType> selectGoodsTypeParent(@Param("companyId") Integer companyId);

    List<GoodsType> selectChildList(@Param("companyId") Integer companyId);

    List<GoodsType> selectChilds(@Param("parentId") Integer parentId, @Param("companyId") Integer companyId);

    List<GoodsType> selectListByParent(@Param("parentId") Integer parentId, @Param("companyId") Integer companyId,@Param("isSelect") Boolean isSelect);

    List<GoodsType> selectChildTypes(@Param("companyId") Integer companyId);

    GoodsType selectByGroupName(@Param("companyId") Integer companyId, @Param("name") String name);
}
